import 'package:flutter/material.dart';
import 'package:yb_zsyiji_androidflutter_pro/YBEngineer/YBBaseRouter/YBNavigator.dart';
import 'package:yb_zsyiji_androidflutter_pro/YBHelper/YBColor/YBColor.dart';
import 'package:yb_zsyiji_androidflutter_pro/YBHelper/YBImageStyle/YBImageStyle.dart';
import 'package:yb_zsyiji_androidflutter_pro/YBHelper/YBTextStyle/YBTextStyle.dart';
import 'package:yb_zsyiji_androidflutter_pro/YBModule/YBHomePage/YBMapMiShuPage/YBMapMiShuProvider/YBMapMiShuEventBus.dart';


class YBMapMiShuNinDeHangYePage extends StatelessWidget {

  TextEditingController _hangYeEditingController = TextEditingController();

  @override
  Widget build(BuildContext context) {
    return Container(
      child: Scaffold(
        appBar: AppBar(
          elevation: 0,
          title: Text(
            "您的行业",
          ),
        ),
        body: Column(
           children: [
             Expanded(
               child: SingleChildScrollView(
                 child: Padding(
                    padding: EdgeInsets.only(left:20,right: 20),
                    child: Column(
                      mainAxisAlignment: MainAxisAlignment.start,
                      crossAxisAlignment: CrossAxisAlignment.start,
                      children: [
                        Container(
                          child: Padding(
                            padding: EdgeInsets.only(top: 24),
                            child: Container(
                                child: Text('您的行业',style:YBTextStyle.TextStyle18181818Medium,)
                            ),
                          ),
                        ),
                        Container(
                          height: 24,
                        ),
                        Container(
                          child: Padding(
                            padding: EdgeInsets.zero,
                            child: Container(
                              height: 44,
                              decoration: BoxDecoration(
                                borderRadius: BorderRadius.all(Radius.circular(8.0)),
                                color: YBColor.colorF0F2F5,
                              ),
                              child: Row(
                                mainAxisAlignment: MainAxisAlignment.start,
                                crossAxisAlignment: CrossAxisAlignment.center,
                                children: [
                                  Container(
                                    width: 12,
                                  ),
                                  Container(
                                    child: Image.asset(YBImageStyle.getImagePath('lawyer_hangyeimageView'),width: 16,height: 16,),
                                  ),
                                  Container(
                                    width: 8,
                                  ),
                                  Expanded(
                                    child: TextField(
                                      decoration: InputDecoration(
                                        hintText: "输入您所处的行业",
                                        border: InputBorder.none,
                                      ),
                                      controller: _hangYeEditingController,
                                    ),
                                  ),
                                ],
                              ),
                            ),
                          ),
                        ),
                      ],
                    ),
                 ),
               ),
             ),
             Container(
               height: 60,
               child: Padding(
                 padding: EdgeInsets.only(left: 20,right: 20),
                 child: Row(
                   mainAxisAlignment: MainAxisAlignment.spaceBetween,
                   crossAxisAlignment: CrossAxisAlignment.center,
                   children: [
                     Expanded(
                       flex: 1,
                       child: Container(
                         height: 44,
                         child: OutlineButton(
                           shape: RoundedRectangleBorder(
                             borderRadius: BorderRadius.all(Radius.circular(8.0)),

                           ),
                           child: Text('清空',style: YBTextStyle.TextStyle64646416,),
                           onPressed: () async {
                                _hangYeEditingController.text = '';
                           },
                         ),
                       ),
                     ),
                     Container(
                       width: 20,
                     ),
                     Expanded(
                       flex: 2,
                       child: Container(
                         height: 44,
                         child: RawMaterialButton(
                           shape: RoundedRectangleBorder(
                             borderRadius: BorderRadius.all(Radius.circular(4.0)),

                           ),
                           fillColor: YBColor.commonThemeColor,
                           child: Text('写好了',style: YBTextStyle.TextStyleFFFFFF16Medium,),
                           onPressed: () async {
                               eventBus.fire(YBMapMiShuHangYeEventBus(_hangYeEditingController.text));
                               YBNavigatorUtil.goBack(context);
                           },
                         ),
                       ),
                     ),
                   ],
                 ),
               ),
             ),
           ],
        ),
      ),
    );
  }
}
